package com.hrc.springbootdemo.strategy;

import com.hrc.springbootdemo.strategy.service.PaperGenerationStrategy;
import jakarta.annotation.Resource;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

@Component
public class PaperStrategyFactory  {

    @Resource
    private ApplicationContext applicationContext;

    public PaperGenerationStrategy getPaperGenerationStrategy(String name)
    {
        return (PaperGenerationStrategy) applicationContext.getBean(name);
    }

}
